Release 10.1A: OpenEdge Application Server:
Developing WebSpeed Applications
Printing from an HTML page
This example shows how a Web page can print itself after it finishes loading in the Web browser:
The next example shows how you can print a portion of a page dynamically. First, you must set up two frames, one that takes up the entire browser window and another that is hidden, as shown:
The
appFramecontains the application. ThejsFrameis used for communicating with the server and for running applications like printing.The following shows the
filePrint()function in the simplifiedmyApp.w codefragment:
The
filePrint()function copies the value of a<TEXTAREA>field namedtextarea0to the hidden frame with a<PRE>prefix. Focus is moved to that frame and then it is printed. If you eliminate the<PRE>prefix, the browser renders the context oftextarea0before it is printed.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |